FROM maven:latest AS builder

ENV APP_HOME=/usr/app

COPY ./*.jar ${APP_HOME}/app.jar

RUN chmod 777 ${APP_HOME}/app.jar

VOLUME /usr/app

EXPOSE 8080/tcp

WORKDIR ${APP_HOME}

ENTRYPOINT ["java", "-jar", "app.jar"]
